package com.xj.edu.hotel.service.serviceImpl;

import com.xj.edu.hotel.domain.City;
import com.xj.edu.hotel.mapper.CityMapper;
import com.xj.edu.hotel.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class CityServiceImpl implements CityService {

    @Autowired
    private CityMapper cityMapper;
    @Override
    public List<City> selectHotelCount() {
        return cityMapper.selectHotelCount();
    }

    @Override
    public List<City> selectHotelTypeCount(String cityname) {
        return cityMapper.selectHotelTypeCount(cityname);
    }

    @Override
    public List<City> findCityByName() {
        return cityMapper.selectAllCity();
    }

    @Override
    public City selectCityByName(String name) {
      return cityMapper.selectByCityName(name);
    }

    @Override
    public List<City> selAllCity() {
        return cityMapper.selectAllCity();
    }
    @Override
    public List<City> findCity() {
        return cityMapper.selectAllCity();
    }


}
